package sort;

public class InsertSort {

    public static void sort(int[] array) {
        for (int i = 1; i < array.length; i++) {
            int j = i - 1;
            int re = array[i];
            for (; j >= 0 && re < array[j]; j--) {
                array[j + 1] = array[j];
            }
            array[j + 1] = re;
        }
    }
}
